-- GENERATED SPELL FOR [Giant Claw Tentacle] --


function spell0_15728(pUnit, Event) --@Ground Rupture,Self--
pUnit:FullCastSpellOnTarget(26478,pUnit)
pUnit:RegisterEvent('Sorts_15728', 662, 1)
end

function spell1_15728(pUnit, Event) --@Ground Tremor,Self--
pUnit:FullCastSpellOnTarget(6524,pUnit)
pUnit:RegisterEvent('Sorts_15728', 2000, 1)
end

function spell2_15728(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(26211,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15728', 10326, 1)
end

function spell3_15728(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_15728', 580, 1)
end

function Sorts_15728(pUnit, Event)
local choix_sorts_15728 = math.random(0, 3)
if choix_sorts_15728 == 0 then
pUnit:RegisterEvent('spell0_15728', 1, 1)
end
if choix_sorts_15728 == 1 then
pUnit:RegisterEvent('spell1_15728', 1, 1)
end
if choix_sorts_15728 == 2 then
pUnit:RegisterEvent('spell2_15728', 1, 1)
end
if choix_sorts_15728 == 3 then
pUnit:RegisterEvent('spell3_15728', 1, 1)
end
end

function mob15728_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15728', math.random(1500, 3000), 1)
end

function mob15728_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15728_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15728_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15728, 1, 'mob15728_Action')
RegisterUnitEvent(15728, 2, 'mob15728_Leave')
RegisterUnitEvent(15728, 3, 'mob15728_Kill')
RegisterUnitEvent(15728, 4, 'mob15728_Die')
